#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int main(){
    char *const env[]={

         ( char *const) "a=1111",
        ( char *const)  "b=2222",
             NULL
           };
    char *const argv[]={
    //   "-a",
    //    "-b",
    //    NULL
       "ls",
       "-l",
        "-a",
        NULL
    };
    //extern char **environ;
//execl("/usr/bin/ls", "ls", "-l", "-a", NULL);//
//
//execlp("./t", "ls", "-l", "-a", NULL);//

    //execle("t","-a","-b",NULL,env);
    
    //execle("/home/sw/linux_learn/test_exec/t","-a","-b",NULL,env);
//execv("/home/sw/linux_learn/test_exec/t",argv);//
//execv("/home/sw/pro_com/process_pool/pool",argv);//
//
extern  int putenv(char *string);
 
    //execvp("ls",argv);//

   execvpe("./t",argv,env);
    
//extern int execvpe(const char *file, char *const argv[], char *const envp[]);
 //extern  int putenv(char *string);
//putenv("P=1"); execvpe("./t",argv ,environ);
 //execvpe("./t",argv ,env);
//execvpe("./t",argv ,env);
//execve("/home/sw/linux_learn/test_exec/./t",argv,env);

//execve("./t",argv,env);


printf("退出\n");
}
